<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>
        {wc:$key}
    </title>
    <meta content="app-id=518966501" name="apple-itunes-app">
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Expires" content="0">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=no, maximum-scale=1.0" />
    <link href="{G_TEMPLATES_CSS}/mobile/comm.css" rel="stylesheet" type="text/css" />
    <link href="{G_TEMPLATES_CSS}/mobile/new.css" rel="stylesheet" type="text/css" />
    <link href="{G_TEMPLATES_CSS}/mobile/index.css" rel="stylesheet" type="text/css" />
    <link href="{G_TEMPLATES_CSS}/mobile2/comm.css" rel="stylesheet" type="text/css" />
    <link href="{G_TEMPLATES_CSS}/mobile/goods.css" rel="stylesheet" type="text/css" />
    <link href="{G_TEMPLATES_CSS}/mobile/yj_goods.css" rel="stylesheet" type="text/css" />
    <script src="{G_TEMPLATES_JS}/mobile/jquery190.js" language="javascript" type="text/javascript"></script>
    <link href="{G_TEMPLATES_CSS}/mobile2/css.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="{G_TEMPLATES_JS}/mobile2/lrtk.js"></script>
    <script id="pageJS" data="{G_TEMPLATES_JS}/mobile/Index.js" language="javascript" type="text/javascript"></script>
    <script src="{G_TEMPLATES_JS}/mobile2/BottomFun.js" language="javascript" type="text/javascript"></script>
    <script src="{G_TEMPLATES_JS}/mobile2/cnzzCount.js" language="javascript" type="text/javascript"></script>
</head>

<body fnav="1" class="g-acc-bg" style="zoom: 1;">
    <input name="isEnabledBakLoadApp" type="hidden" id="isEnabledBakLoadApp" value="0">
    <div class="marginB" id="loadingPicBlock">
        <!--首页头部-->
        <div class="m-block-header" style="">
            <a href="#" class="m-public-icon m-1yyg-icon"></a>
        </div>
        <!--首页头部 end-->
        <!-- 代码 开始 -->
        <div id="playBox" style="width: 100%">
            <div class="pre"></div>
            <div class="next"></div>
            <div class="smalltitle">
                <ul>
                    <li class="thistitle"></li>
                    <li></li>
                </ul>
            </div>
            <ul class="oUlplay">
                <li>
                    <a href="http://www.lanrentuku.com/" target="_blank"><img src="images/1.jpg"></a>
                </li>
                <li>
                    <a href="http://www.lanrentuku.com/" target="_blank"><img src="images/2.jpg"></a>
                </li>
            </ul>
        </div>
        <!-- 代码 结束 -->
        <!--分类-->
        <div class="index-menu thin-bor-top thin-bor-bottom">
            <ul class="menu-list">
                <li>
                    <a href="?/mobile/mobile/glist">
                        <i class="xinpin"></i>
                        <span class="title">新品</span>
                    </a>
                </li>
                <!--  <li>
                    <a href="javascript:;" >
                        <i class="chongzhi"></i>
                        <span class="title">充值</span>
                    </a>
                </li> -->
                <li>
                    <a href="?/mobile/mobile/glist/1">
                        <i class="xiangou"></i>
                        <span class="title">限购</span>
                    </a>
                </li>
                <!--   <li>
                    <a href="javascript:;" >
                        <i class="xiazai"></i>
                        <span class="title">下载APP</span>
                    </a>
                </li> -->
                <li>
                    <a href="?/mobile/mobile/glist">
                        <i class="fenlei"></i>
                        <span class="title">全部分类</span>
                    </a>
                </li>
            </ul>
        </div>
        <!-- 搜索 -->
        <div class="pro-s-box thin-bor-bottom search-box focus-box" id="divSearch" style="position: relative;">    
	        <div class="box">
	            <div class="border">
	                <div class="border-inner"></div>
	            </div>
	            <div class="input-box">
	                <i class="s-icon"></i>
	                <input type="text" placeholder="输入“手机”试试" id="txtSearch" maxlength="10">
	            </div>
	        </div>
	        <a href="javascript:;" class="s-btn" id="btnSearch" style="cursor: pointer;">搜索</a>
	    </div>
	    <script type="text/javascript">
	    	$('#btnSearch').click(function(){
	    		var keyWord = $('#txtSearch').val();
	    		location.href = '{WEB_PATH}/mobile/mobile/yj_search/'+keyWord;
	    	});
	    </script>
        <!-- 内页顶部 -->
        <section class="goodsCon" style="background-color:#fff;">
            <!-- 导航 -->
            <div class="goodsNav">
                <ul id="divGoodsNav">
                    <li order="10" class="current"><a href="javascript:;">即将揭晓<b></b></a></li>
                    <li order="20"><a href="javascript:;">人气<b></b></a></li>
                    <li order="40"><a href="javascript:;">最新<b></b></a></li>
                    <li order="50" type="price"><a href="javascript:;">价格<em></em><s></s><b></b></a></li>
                    <li order="">
                        <a href="javascript:;">商品分类<s class="arrowUp"></s></a>
                        <dl style="display:none;">
                            <dd type="0" class="sOrange"><a href="javascript:;">全部</a></dd>
                            {wc:getlist sql="select * from `@#_category` where `model`='1'"} {wc:loop $data $categoryx}
                            <dd><a id="{wc:$categoryx['cateid']}" href="javascript:;">{wc:$categoryx['name']}</a></dd>
                            {wc:loop:end} {wc:getlist:end}
                        </dl>
                    </li>
                </ul>
            </div>
            <!-- 列表 -->
            <div class="goodsList">
                <div id="divGoodsLoading" class="loading" style="display:none;"><b></b>正在加载...</div>
                <a id="btnLoadMore" class="loading" href="javascript:;" style="display:none;">点击加载更多</a>
                <a id="btnLoadMore2" class="loading" style="display:none;">没有数据</a>
                <a id="btnLoadMore3" class="loading" style="display:none;">已经到底了</a>
            </div>
        </section>
        <input id="urladdress" value="" type="hidden" />
        <input id="pagenum" value="" type="hidden" />
        <script type="text/javascript">
        //打开页面加载数据
        window.onload = function() {
                glist_json("list/10");

                MyAutoRun();

                //购物车数量
                $.getJSON('{WEB_PATH}/mobile/ajax/cartnum', function(data) {
                    if (data.num) {
                        $("#btnCart").append('<em>' + data.num + '</em>');
                    }
                });

            }
            //获取数据
        function glist_json(parm) {
            $("#urladdress").val('');
            $("#pagenum").val('');
            $.getJSON('{WEB_PATH}/mobile/mobile/glistajax/' + parm, function(data) {
                $("#divGoodsLoading").css('display', 'none');
                if (data[0].sum) {
                    var fg = parm.split("/");
                    $("#urladdress").val(fg[0] + '/' + fg[1]);
                    $("#pagenum").val(data[0].page);
                    for (var i = 0; i < data.length; i++) {
                        var ul = '<ul style="width:50%;height:250px;"><li>';
                        ul += '<a href = "/?/mobile/mobile/item/' + data[i].id + '">';
                        ul += '<img style="display: block;width: 100px;height: 100px;margin: 0 auto;" src="{G_UPLOAD_PATH}/' + data[i].thumb + '">';
                        ul += '</a>';
                        ul += '<div class="goodsListR">';
                        ul += '<h2 style="margin: 7px 0 2px; overflow:hidden;height:18px; font-size:12px;" id="' + data[i].id + '">' + data[i].title + '</h2>';
                        ul += '<h2 style="margin: 7px 0 2px; overflow:hidden;height:18px; font-size:12px;" id="' + data[i].id + '">' + data[i].canyurenshu + '已参与</h2>';
                        ul += '<div class="pRate">';
                        ul += '<div class="Progress-bar" id="' + data[i].id + '">';
                        ul += '<p class="u-progress"><span class="pgbar" style="width:' + (data[i].canyurenshu / data[i].zongrenshu) * 100 + '%;"><span class="pging"></span></span></p>';
                        ul += '<ul class="Pro-bar-li">';
                        //ul+='<li class="P-bar01"><em>'+data[i].canyurenshu+'</em>已参与</li>';
                        //ul+='<li class="P-bar02"><em>'+data[i].zongrenshu+'</em>总需人次</li>';
                        //ul+='<li class="P-bar03"><em>'+data[i].shenyurenshu+'</em>剩余</li>';
                        ul += '</ul></div>';

                        ul += '<div class="goods-wrap"><div class="btn-wrap" name="buyBox" limitbuy="0" surplus="789" totalnum="7030" alreadybuy="6241"><span style="width:100px;" id="' + data[i].id + '" class="z-Limg"><a href="javascript:;" class="buy-btn" codeid="12470891">立即1元云购</a></span><div class="gRate" codeid="" canbuy="789"><a class="add2" href="javascript:;" codeid="' + data[i].id + '"><s></s></a></div></div></div>';

                        //ul+='<a class="add " codeid="'+data[i].id+'" href="javascript:;"><s></s></a>';
                        ul += '</div></div></li></ul>';
                        $("#divGoodsLoading").before(ul);
                    }
                    if (data[0].page <= data[0].sum) {
                        $("#btnLoadMore").css('display', 'block');
                        $("#btnLoadMore2").css('display', 'none');
                        $("#btnLoadMore3").css('display', 'none');
                    } else if (data[0].page > data[0].sum) {
                        $("#btnLoadMore").css('display', 'none');
                        $("#btnLoadMore2").css('display', 'none');
                        $("#btnLoadMore3").css('display', 'block');
                    }
                } else {
                    $("#btnLoadMore").css('display', 'none');
                    $("#btnLoadMore2").css('display', 'block');
                    $("#btnLoadMore3").css('display', 'none');
                }
            });
        }
        $(document).ready(function() {
            //即将揭晓,人气,最新,价格	
            $("#divGoodsNav li:not(:last)").click(function() {
                var l = $(this).index();
                $("#divGoodsNav li").removeClass().eq(l).addClass('current');
                var parm = $("#divGoodsNav li").eq(l).attr('order');
                $("#divGoodsLoading").css('display', 'block');
                $(".goodsList ul").remove();
                var glist = glist_json("list/" + parm);
            });

            //商品分类
            var dl = $("#divGoodsNav dl"),
                last = $("#divGoodsNav li:last"),
                first = $("#divGoodsNav dd:first");
            dl.css("width", "100%");
            $("#divGoodsNav li:last a:first").click(function() {
                if (dl.css("display") == 'none') {
                    dl.show();
                    last.addClass("gSort");
                    first.addClass("sOrange");
                } else {
                    dl.hide();

                    last.removeClass("gSort");
                    first.removeClass("sOrange");
                }
            });
            $("#divGoodsNav  dd").click(function() {
                var s = $(this).index();
                var t = $("#divGoodsNav .gSort dd a").eq(s).html();
                var id = $("#divGoodsNav .gSort dd a").eq(s).attr('id');
                $("#divGoodsNav .gSort a:first").html(t + '<s class="arrowUp"></s>');
                var l = $("#divGoodsNav .current").index(),
                    parm = $("#divGoodsNav li").eq(l).attr('order');
                if (id) {
                    $("#divGoodsLoading").css('display', 'block');
                    $(".goodsList ul").remove();
                    glist_json(id + '/' + parm);
                } else {
                    glist_json("list/" + parm);
                    $(".goodsList ul").remove();
                }
                dl.hide();
                last.removeClass("gSort");
                first.removeClass("sOrange");
            });
            //加载更多
            $("#btnLoadMore").click(function() {
                var url = $("#urladdress").val(),
                    page = $("#pagenum").val();
                glist_json(url + '/' + page);
            });
            //返回顶部
            $(window).scroll(function() {
                if ($(window).scrollTop() > 50) {
                    $("#btnTop").show();
                } else {
                    $("#btnTop").hide();
                }
            });
            $("#btnTop").click(function() {
                $("body").animate({
                    scrollTop: 0
                }, 10);
            });
            //添加到购物车
            $(document).on("click", '.add2', function() {
                var codeid = $(this).attr('codeid');
                $.getJSON('{WEB_PATH}/mobile/ajax/addShopCart/' + codeid + '/1', function(data) {
                    if (data.code == 1) {
                        addsuccess('添加失败');
                    } else if (data.code == 0) {
                        addsuccess('添加成功');
                    }
                    else if (data.code == 998) {
                       
                        addsuccess('已购买至限购上限');
                    }
                    return false;
                });
            });

            function addsuccess(dat) {
                $("#pageDialogBG .Prompt").text("");
                var w = ($(window).width() - 255) / 2,
                    h = ($(window).height() - 45) / 2;
                $("#pageDialogBG").css({
                    top: h,
                    left: w,
                    opacity: 0.8
                });
                $("#pageDialogBG").stop().fadeIn(1000);
                $("#pageDialogBG .Prompt").append('<s></s>' + dat);
                $("#pageDialogBG").fadeOut(1000);
                //购物车数量
                $.getJSON('{WEB_PATH}/mobile/ajax/cartnum', function(data) {
                    $("#btnCart").append('<em>' + data.num + '</em>');
                });
            }
            //跳转页面
            var gt = '.goodsList span,.goodsList h2,.goodsList .Progress-bar';
            $(document).on('click', gt, function() {
                var id = $(this).attr('id');
                if (id) {
                    window.location.href = "{WEB_PATH}/mobile/mobile/item/" + id;
                }
            });

        });
        </script>
        <div class="footer clearfix" style="bottom: 0px;">
            <ul>
                <li class="f_home"><a href="?/mobile/mobile/" class="hover"><i></i>云购</a></li>
                <li class="f_announced"><a href="?/mobile/mobile/lottery"><i></i>最新揭晓</a></li>
                <li class="f_single"><a href="?/mobile/shaidan/"><i></i>晒单</a></li>
                <li class="f_car"><a href="?/mobile/cart/cartlist"><i></i>购物车</a></li>
                <li class="f_personal"><a href="?/mobile/user/login"><i></i>我的云购</a></li>
            </ul>
        </div>
    </div>
    <script>
    $("#div_fastnav").click(function() {
        $("#xs").toggle();
    });
    </script>
    <div id="div_fastnav" class="fast-nav-wrapper">
        <ul class="fast-nav">
            <li id="li_menu" isshow="0"><a href="javascript:;"><i class="nav-menu"></i></a></li>
            <li id="li_top" style="display: none;"><a href="javascript:;"><i class="nav-top"></i></a></li>
        </ul>
        <div id="xs" class="sub-nav five" style="display:none;"><a href="?/mobile/mobile/"><i class="home"></i>云购</a><a href="?/mobile/mobile/lottery"><i class="announced"></i>最新揭晓</a><a href="?/mobile/shaidan/"><i class="single"></i>晒单</a><a href="?/mobile/user/login"><i class="personal"></i>我的云购</a><a href="?/mobile/cart/cartlist"><i class="shopcar"></i>购物车</a></div>
    </div>
    <div>
        <object id="ClCache" click="sendMsg" host="" width="0" height="0"></object>
    </div>
    <script language="javascript" type="text/javascript">
    var Path = new Object();
    Path.Skin = "{G_TEMPLATES_STYLE}";
    Path.Webpath = "{WEB_PATH}";

    var Base = {
        head: document.getElementsByTagName("head")[0] || document.documentElement,
        Myload: function(B, A) {
            this.done = false;
            B.onload = B.onreadystatechange = function() {
                if (!this.done && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) {
                    this.done = true;
                    A();
                    B.onload = B.onreadystatechange = null;
                    if (this.head && B.parentNode) {
                        this.head.removeChild(B)
                    }
                }
            }
        },
        getScript: function(A, C) {
            var B = function() {};
            if (C != undefined) {
                B = C
            }
            var D = document.createElement("script");
            D.setAttribute("language", "javascript");
            D.setAttribute("type", "text/javascript");
            D.setAttribute("src", A);
            this.head.appendChild(D);
            this.Myload(D, B)
        },
        getStyle: function(A, B) {
            var B = function() {};
            if (callBack != undefined) {
                B = callBack
            }
            var C = document.createElement("link");
            C.setAttribute("type", "text/css");
            C.setAttribute("rel", "stylesheet");
            C.setAttribute("href", A);
            this.head.appendChild(C);
            this.Myload(C, B)
        }
    }

    function GetVerNum() {
        var D = new Date();
        return D.getFullYear().toString().substring(2, 4) + '.' + (D.getMonth() + 1) + '.' + D.getDate() + '.' + D.getHours() + '.' + (D.getMinutes() < 10 ? '0' : D.getMinutes().toString().substring(0, 1))
    }
    $(document).ready(function() {
        var _SkinDomain = $("#hidIsHttps").val() == "1" ? "https://skin.1yyg.net" : "https://skin.1yyg.net";
        Base.getScript(_SkinDomain + '/v41/weixin/JS/Bottom.js?v=' + GetVerNum(), function() {
            var _pagetype = $("#hidPageType").val();
            var _footer = $("div.footer");
            var _cartpay = $("#mycartpay");
            var _cartlist = 0; //$("li", "#cartBody");
            var _saysome = $("div.saysome");
            var _curpage = window.location.href.toLowerCase();

            var _ishide = false;
            if (_cartpay.length > 0 && _cartlist.length > 0) {
                _footer = _cartpay;
                _pagetype = "1";
                _ishide = true;
            } else if (_saysome.length > 0) {
                _footer = _saysome;
                _pagetype = "1";
            }
            //弹出输入法是否隐藏底部导航
            if (_curpage.indexOf('/member/recharge.do') > 0 || _curpage.indexOf('/member/goodsbuydetail-') > 0) {
                _ishide = true;
            }

            var _hh = parseInt($(window).height());
            var _ww = $(window).width();
            if (_pagetype != "-1" && _footer.length > 0) {
                var SetFooterPos = function() {
                    var j = 0;
                    var _setObj;
                    _setObj = setInterval(function() {
                        var _hh1 = parseInt($(window).height());
                        var _hh2 = _hh - _hh1;

                        if (_hh1 > 200) {
                            if (_hh2 > 0) {
                                if (parseInt($(window).width()) != parseInt(_ww)) {
                                    _footer.css("bottom", 0).show();
                                }
                            } else {
                                _footer.css("bottom", 0).show();
                            }
                            j++;
                            //$("#mycarttest").html(_hh1 + "||" + _hh2 + "||" + $(window).width());
                            if (j == 3) {
                                clearInterval(_setObj);
                            }
                        }
                    }, 100);
                }

                SetFooterPos();

                window.onresize = function() {
                    if (_ishide) {
                        _footer.hide();
                    }
                    SetFooterPos();
                };
            }
        });
    });
    </script>
</body>

</html>
<style>
#pageDialogBG {
    -webkit-border-radius: 5px;
    width: 255px;
    height: 45px;
    color: #fff;
    font-size: 16px;
    text-align: center;
    line-height: 45px;
    /*display: block;*/
    left: 20%;
    top: 43%;
    position: fixed;
}
</style>
<div id="pageDialogBG" class="pageDialogBG">
    <div class="Prompt"></div>
</div>
<SCRIPT LANGUAGE="JavaScript">
function getStyle(obj, name) {
    if (obj.currentStyle) {
        return obj.currentStyle[name]
    } else {
        return getComputedStyle(obj, false)[name]
    }
}

function getByClass(oParent, nClass) {
    var eLe = oParent.getElementsByTagName('*');
    var aRrent = [];
    for (var i = 0; i < eLe.length; i++) {
        if (eLe[i].className == nClass) {
            aRrent.push(eLe[i]);
        }
    }
    return aRrent;
}

function startMove(obj, att, add) {
    clearInterval(obj.timer)
    obj.timer = setInterval(function() {
        var cutt = 0;
        if (att == 'opacity') {
            cutt = Math.round(parseFloat(getStyle(obj, att)));
        } else {
            cutt = Math.round(parseInt(getStyle(obj, att)));
        }
        var speed = (add - cutt) / 4;
        speed = speed > 0 ? Math.ceil(speed) : Math.floor(speed);
        if (cutt == add) {
            clearInterval(obj.timer)
        } else {
            if (att == 'opacity') {
                obj.style.opacity = (cutt + speed) / 100;
                obj.style.filter = 'alpha(opacity:' + (cutt + speed) + ')';
            } else {
                obj.style[att] = cutt + speed + 'px';
            }
        }

    }, 30)
}


　　
function MyAutoRun() {
    var oDiv = document.getElementById('playBox');
    var oPre = getByClass(oDiv, 'pre')[0];
    var oNext = getByClass(oDiv, 'next')[0];
    var oUlBig = getByClass(oDiv, 'oUlplay')[0];
    var aBigLi = oUlBig.getElementsByTagName('li');
    var oDivSmall = getByClass(oDiv, 'smalltitle')[0]
    var aLiSmall = oDivSmall.getElementsByTagName('li');

    function tab() {
        for (var i = 0; i < aLiSmall.length; i++) {
            aLiSmall[i].className = '';
        }
        aLiSmall[now].className = 'thistitle'
        startMove(oUlBig, 'left', -(now * aBigLi[0].offsetWidth))
    }
    var now = 0;
    for (var i = 0; i < aLiSmall.length; i++) {
        aLiSmall[i].index = i;
        aLiSmall[i].onclick = function() {
            now = this.index;
            tab();
        }
    }
    oPre.onclick = function() {
        now--
        if (now == -1) {
            now = aBigLi.length;
        }
        tab();
    }
    oNext.onclick = function() {
        now++
        if (now == aBigLi.length) {
            now = 0;
        }
        tab();
    }
    var timer = setInterval(oNext.onclick, 3000) //滚动间隔时间设置
    oDiv.onmouseover = function() {
        clearInterval(timer)
    }
    oDiv.onmouseout = function() {
        timer = setInterval(oNext.onclick, 3000) //滚动间隔时间设置
    }　　
}
</SCRIPT>


